<script setup lang="ts">
import { ref } from "vue"
import ObsImage from '#/components/obsImage.vue';
defineOptions({ name: 'Dialog' })

const dialogVisible = ref(false)
const templateFile = ref()

const inint = (data: any) => {
  dialogVisible.value = true
  templateFile.value = data.templateFile
}

const handleClose = () => {
  dialogVisible.value = false
}


defineExpose({ inint })

</script>
<template>
  <el-dialog v-model="dialogVisible" width="600px" align-center center :destroy-on-close="true" :title="$t('certificate.templateView')" :append-to-body="true"
    :close-on-click-modal="false" :before-close="handleClose">
    <div class="inline-block border-solid border-[1px] min-h-[300px]">
      <ObsImage v-if="templateFile" :showPreview="false" :src="templateFile" />
    </div>
  </el-dialog>
</template>
<style lang="less" scoped>
#pdfContainer {
  :deep(canvas) {
    margin: 0 auto;
    border: 1px solid #eee;
  }
}
</style>
